package com.wm.blog_web.dao;


import com.wm.blog_common.base.BaseDAO;
import com.wm.blog_common.domain.TBlogDO;
import com.wm.blog_common.entity.TBlog;
import com.wm.blog_web.mapper.TBlogMapper;
import com.wm.blog_web.query.TBlogQuery;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * <p>
 * 博客表 服务DAO层
 * </p>
 *
 * @author wm_yu
 * @since 2020-03-24
 */
@Repository
public class TBlogDAO extends BaseDAO<TBlogMapper, TBlog> {

    @Autowired
    private TBlogMapper tBlogMapper;

    /**
     * 按月统计
     * @param query
     * @return
     */
    public List<TBlogDO> countByMonth(TBlogQuery query) {
        return tBlogMapper.countByMonth(query);
    }
}

